package com.ysd.lis.controller.emr;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.dto.emr.EmrDto;
import com.ysd.lis.entity.emr.EmrItemStandardTask;
import com.ysd.lis.request.emr.EmrParam;
import com.ysd.lis.service.emr.EmrItemStandardTaskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * cold_chain.sys_module 前端控制器
 * </p>
 *
 * @author prs
 * @since 2025-06-07
 */
@Api(tags = "标准模型")
@RestController
@RequestMapping("/lis/emr/itemStandardTask")
public class EmrItemStandardTaskController extends BaseController {

    @Autowired
    EmrItemStandardTaskService emrItemStandardTaskService;

    @ApiOperation("查询评价标准树")
    @GetMapping("/findEmrItemStandardTree")
    public Result findEmrItemStandardTree(){
        return emrItemStandardTaskService.findEmrItemStandardTree();
    }

    @ApiOperation("查询")
    @GetMapping("/findItemStandardTaskList")
    public Result findItemStandardTaskList(EmrParam pageParam){
        return emrItemStandardTaskService.findItemStandardTaskList(pageParam);
    }

    @ApiOperation("新增")
    @PostMapping("/addStandardTask")
    public Result addStandardTask(@RequestBody EmrItemStandardTask material){
        return  emrItemStandardTaskService.addStandardTask(material);
    }

    @ApiOperation("修改")
    @PostMapping("/editStandardTask")
    public Result editStandardTask(@RequestBody EmrItemStandardTask material) {
        return emrItemStandardTaskService.editStandardTask(material);
    }

    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteItemStandardTask")
    public Result batchDeleteItemStandardTask(@RequestBody EmrDto dto){
        return  emrItemStandardTaskService.batchDeleteItemStandardTask(dto);
    }
}
